#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import re

from PIL import Image

from autoPilot import Pilot
def ttt():
    output_dir = "captchas"
    file_list = [f for f in os.listdir(output_dir) if re.search(r'\d+', f)]
    file_list.sort(reverse=True)
    for i in range(1):
        print(file_list[i])
        image = Image.open(os.path.join(output_dir, file_list[i]))
        Pilot.image2txt(image, 'tesseract', test=True)


def main():
    print("xxx")
    return
if __name__ == '__main__':
    main()